Skip to content

build: remove install hooks from release dist#812

Open
haatveit wants to merge 1 commit intodatabus23:masterfrom
haatveit:no-release-hooks
Open

build: remove install hooks from release dist#812
haatveit wants to merge 1 commit intodatabus23:masterfrom
haatveit:no-release-hooks

Conversation

@haatveit
Copy link

@haatveit haatveit commented Jul 9, 2025

This commit removes the hooks section from plugin.yaml when staging it for release in the dist target, as the script referenced there is not bundled as part of releases, and also not needed.

This fixes #504.

(I hope this Makefile target is actually what you still use to prepare releases, under the release assets there are files like helm-diff-freebsd-arm64.tgz that aren't being built here.)

This commit removes the hooks section from plugin.yaml when staging
it for release in the dist target, as the script referenced there is not
bundled as part of releases, and also not needed.

This fixes databus23#504.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes Helm plugin install/update hooks from the plugin.yaml that gets staged into release tarballs, since the hook script isn’t bundled in release archives and causes helm plugin install to fail (issue #504).

Changes:

  • Stop copying plugin.yaml verbatim into build/diff.
  • Generate build/diff/plugin.yaml from plugin.yaml with the entire top-level hooks: section stripped via awk.

Comment on lines +74 to +75
cp README.md LICENSE build/diff
awk '/^hooks:/ { in_hooks = 1; next } in_hooks && /^[^[:space:]]/ { in_hooks = 0 } !in_hooks { print }' plugin.yaml > build/diff/plugin.yaml
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change updates the make dist packaging, but the repo's GitHub Releases are currently produced by GoReleaser (see .github/workflows/release.yaml), which still archives plugin.yaml as-is (with hooks) and does not include install-binary.sh. As a result, the published helm-diff-*.tgz artifacts will likely continue to fail helm plugin install the same way (#504). Consider either (a) updating GoReleaser packaging to drop the hooks section for release archives, or (b) adding install-binary.sh to the archived files, or (c) switching the release workflow to run make dist and upload release/*.tgz.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After downloading the .tgz release files, helm plugin install is failing

2 participants